local joy__wushen = fk.CreateSkill {

  name = "joy__wushen",

  tags = {  },

}



joy__wushen:addEffect("viewas", {
  name = "joy__wushen",
  anim_type = "offensive",
  pattern = "slash",
  card_filter = function(self, player, to_select, selected)
    if #selected == 1 then return false end
    return Fk:getCardById(to_select).suit == Card.Heart
  end,
  view_as = function(self, player,cards)
    if #cards ~= 1 then
      return nil
    end
    local c = Fk:cloneCard("slash")
    c.skillName = joy__wushen.name
    c:addSubcard(cards[1])
    return c
  end,
})

joy__wushen:addEffect("targetmod", {
  name = "#joy__wushen_targetmod",
  anim_type = "offensive",
  bypass_distances = function(self, player, skill, card)
    return player:hasSkill(joy__wushen.name) and skill.trueName == "slash_skill" and card.suit == Card.Heart
  end,
})

joy__wushen:addEffect(fk.AfterCardUseDeclared, {
  name = "#joy__wushen_trigger",
  --joy__wushen,
  mute = true,
  events = {fk.AfterCardUseDeclared},
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(joy__wushen.name) then
      return  data.card.trueName == "slash" and data.card.suit == Card.Heart
    end
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    local room = player.room
      room:notifySkillInvoked(player, "joy__wushen", "offensive")
      data.additionalDamage = (data.additionalDamage or 0) + 1
  end,
})

return joy__wushen